package jsyf.oa.entity.app;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by Xzq on 2018/1/24.
 */
@Entity
@Table(name = "T_APP_FEEDBACK", schema = "oa", catalog = "")
public class FeedBackEntity extends BaseEntity {
    private String createUserName;
    private String createUserId;
    private String content;
    private String urgentFlag;
    private String updateUserId;
    private String updateUserName;
    private Date finishTime;


    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getUrgentFlag() {
        return urgentFlag;
    }

    public void setUrgentFlag(String urgentFlag) {
        this.urgentFlag = urgentFlag;
    }

    public String getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(String updateUserId) {
        this.updateUserId = updateUserId;
    }

    public String getUpdateUserName() {
        return updateUserName;
    }

    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }

    public Date getFinishTime() {
        return finishTime;
    }

    public void setFinishTime(Date finishTime) {
        this.finishTime = finishTime;
    }
    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("CREATE_USER_NAME", getCreateUserName());
        obj.put("CREATE_USER_ID", getCreateUserId());
        obj.put("CREATE_TIME", getCreateTime());
        obj.put("CONTENT", getContent());
        obj.put("UPDATE_TIME", getUpdateTime());
        obj.put("UPDATE_USER_ID", getUpdateUserId());
        obj.put("UPDATE_USER_NAME", getUpdateUserName());
        obj.put("FINISH_TIME", getFinishTime());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_APP_FEEDBACK";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("CREATE_USER_NAME", "createUserName");
        obj.put("CREATE_USER_ID", "createUserId");
        obj.put("CREATE_TIME", "createTime");
        obj.put("CONTENT", "content");
        obj.put("URGENT_FLAG", "urgentFlag");
        obj.put("UPDATE_TIME", "updateTime");
        obj.put("UPDATE_USER_ID", "updateUserId");
        obj.put("UPDATE_USER_NAME", "updateUserName");
        obj.put("FINISH_TIME", "finishTime");
        return obj;
    }
}
